const mysql = require("mysql");

const connection = mysql.createConnection({
  host: "127.0.0.1", // 数据库地址
  user: "root", // 数据库用户名
  password: "mm70864721", // 数据库密码
  database: "ming", // 数据库名
});

connection.connect((err) => {
  if (err) {
    console.error("Error connecting to database:", err);
    return;
  }
  console.log("Connected to MySQL database successfully!");
});

module.exports = connection;
